<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery.min.js"></script>
    <script>
        $(function () {
            $("#login").click(function () {
                let account = $("#account").val();
                let pwd = $("#pwd").val();
                let rm = $("#rm").prop("checked");
                $.ajax({
                    url:"user/login",
                    type:"POST",
                    data:{
                        account:account,
                        pwd:pwd,
                        rm:rm
                    },
                    success:function (res) {
                        console.log(res);
                        //请求后台跳转到首页
                        if(res=="success"){
                            //跳转页面
                            window.location.href="/jump/main";
                        }
                    }
                });
            });
        });
    </script>
</head>
<body>
    <div>
        <input type="text" id="account"><br>
        <input type="password" id="pwd"><br>
        <input type="checkbox" id="rm">记住我<br>
        <button id="login">登录</button>
    </div>
</body>
</html>